package exception;

public class TryCatDemo {
    public static void main(String[] args) {

        try{

            String a=null;
            System.out.println(a.length());

            String b="";
            System.out.println(b.charAt(0));
            String c="789";
            System.out.println(Integer.parseInt(c));
//        }catch (NullPointerException p){
//
//            System.out.println("已经处理");
//        }catch (NullPointerException|StringIndexOutOfBoundsException l){
//            System.out.println("下标越界");
        }catch (Exception e){
            System.out.println("Exception超类处理全部异常");
        }finally {
            System.out.println();
        }



    }
}
